class UsersController < ApplicationController

  before_filter :confirm_logged_in

  def my_information
    render :json => current_user.all_information
  end

  def show
    user = User.find_by_id params[:id]
    if current_user.are_friends? user
      render :json => user.all_information
    else
      response = {
        :type => "forbidden"
      }
      render :json => response
    end
  end

end
